in xen-compat.h. It leads to building a broken kernel image
where the kernel sources end up using an unexpected interface
version. In the case of Linux, the kernel expects to use
the new sched_op() hypercall but ends up calling the
legacy hypercall -- this breaks poll, reboot, and save/restore.
A more acceptable patch would be to detect the empty
definition in xen-compat.h and give a reasonable #error message
to fail the build: the current error message is confusing.
Signed-off-by: Keir Fraser <keir@xensource.com>
#if defined(__XEN__)
/* Xen is built with matching headers and implements the latest interface. */
#define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__
-#elif (__XEN_INTERFACE_VERSION__ - 0) == 0
+#elif !defined(__XEN_INTERFACE_VERSION__)
/* Guests which do not specify a version get the legacy interface. */
-#ifdef __XEN_INTERFACE_VERSION__
-#undef __XEN_INTERFACE_VERSION__
-#endif
#define __XEN_INTERFACE_VERSION__ 0x00000000
#endif